(function(){
	var Queue=window.Queue=function(){
		this.getFunc(this,Queue._objParent)();
		this.aScan=this.$('#aScan');
		this.bindEvent(this.aScan,'click',this.getFunc(this,this.scan));
		this.intScanNum=0;
	}.extend(Base);
	pt=Queue.prototype;
	pt.scan=function(p_objEvent){
		this.stopDefault(p_objEvent);
		Dialog.show({
			title:'Drama',
			showstr:'正在扫描...'
		});
		this.ajax({
			url:this.getAttribute(this.aScan,'href'),
			onSuccess:this.getFunc(this,this.scanCallBack,[this.aScan]),
			timeout:60000
		});
	},pt.scanCallBack=function(p_objContainer,p_intNum){
		this.intScanNum=p_intNum;
		Dialog.closeshow();
		Dialog.alert({
			title:'Drama',
			alertstr:'扫描结束,共扫描到'+p_intNum+'个文件',
			btnstr:'确定',
			yesCallBack:this.reloadURL,
			yesObject:this
		});
		if(0==p_intNum){
			p_objContainer.innerHTML='扫描结束,共扫描到'+p_intNum+'个文件.点击再次扫描';
		}
	},pt.reloadURL=function(){
		if(this.intScanNum>0){
			location.reload();
		}
	}
})();